$Id: README.audio,v 1.3 1996/06/05 02:19:36 fritz Exp $

ISDN subsystem for Linux.
  Description of audio mode.

When enabled during kernel configuration, the tty emulator of the ISDN
subsystem is capable of a reduced set of commands to support audio.
This document describes the commands supported and the format of
audio data.

Commands for enabling/disabling audio mode:

        AT+FCLASS=8      Enable audio mode.
                         This affects the following registers:
                           S18: Bits 0 and 3 are set.
                           S16: Set to 48 and any further change to
                                larger values is blocked.
        AT+FCLASS=0      Disable audio mode.
                         Register 18 is set to 4.
        AT+FCLASS=?      Show possible modes.
        AT+FCLASS?       Report current mode (0 or 8).

Commands supported in audio mode:

All audio mode commands have the one of the following form:

        AT+Vxx?          Show current setting.
        AT+Vxx=?         Show possible settings.
        AT+Vxx=v         Set simple parameter.
        AT+Vxx=v,v ...   Set complex parameter.

where xx is a two-character code and v are alphanumerical parameters.
The following commands are supported:

        AT+VNH=x         Auto hangup setting. NO EFFECT, supported
                         for compatibility only.
        AT+VNH?          Always reporting "1"
        AT+VNH=?         Always reporting "1"

        AT+VIP           Reset all audio parameters.

        AT+VLS=x         Line select. x is one of the following:
                           0 = No device.
                           2 = Phone line.
        AT+VLS=?         Always reporting "0,2"
        AT+VLS?          Show current line.

        AT+VRX           Start recording. Emulator responds with
                         CONNECT and starts sending audio data to
                         the application. See below for data format

        AT+VSD=x,y       Set silence-detection parameters.
                         NO EFFECT, supported for compatibility
                         only. Possible parameters:
                           x = 0 ... 31
                           y = 0 ... 255
        AT+VSD=?         Report possible parameters.
        AT+VSD?          Show current parameters.

        AT+VSM=x         Select audio data format.
                         Possible parameters:
                           2 = ADPCM-2
                           3 = ADPCM-3
                           4 = ADPCM-4
                           5 = aLAW
                           6 = uLAW
        AT+VSM=?         Show possible audio formats.

        AT+VTX           Start audio playback. Emulator responds
                         with CONNECT and starts sending audio data
                         received from the application via phone line.
General behavior and description of data formats/protocol.
    when a connection is made:

      On incoming calls, if the application responds to a RING
      with ATA, depending on the calling service, the emulator
      responds with either CONNECT (data call) or VCON (voice call).
      
      On outgoing voice calls, the emulator responds with VCON
      upon connection setup.

  Audio recording.

    When receiving audio data, a kind of bisync protocol is used.
    Upon AT+VRX command, the emulator responds with CONNECT, and
    starts sending audio data to the application. There are several
    escape sequences defined, all using DLE (0x10) as Escape char:

    <DLE><ETX>              End of audio data. Emulator stops
                            recording, responding with VCON.
    <DLE><DLE>              Escape sequence for DLE in data stream.
    <DLE>0                  Touchtone "0" received.
         ...
    <DLE>9                  Touchtone "9" received.
    <DLE>#                  Touchtone "#" received.
    <DLE>*                  Touchtone "*" received.
    <DLE>A                  Touchtone "A" received.
    <DLE>B                  Touchtone "B" received.
    <DLE>C                  Touchtone "C" received.
    <DLE>D                  Touchtone "D" received.

    Currently unsupported DLE sequences:

    <DLE>c                  FAX calling tone received.
    <DLE>b                  busy tone received.
    <DLE>q                  quiet. Silence detected after non-silence.
    <DLE>s                  silence. Silence detected from the
                            start of recording.

    Any character sent by the application, except XON (0x11) or XOFF (0x13)
    immediately stops recording.

  Audio playback.

    When sending audio data, upon AT+VTX command, emulator responds with
    CONNECT, and starts transferring data from application to the phone line.
    The same DLE sequences apply to this mode.


